﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Oroboros;
using Oroboros.Objects;
using Oroboros.Save_Data;

namespace Save_Editor.Controls
{
    /// <summary>
    /// Interaction logic for wpfTaskControl.xaml
    /// </summary>
    public partial class wpfTaskControl : UserControl
    {
        private TaskSaveData myTask;
        public wpfTaskControl()
        {
            InitializeComponent();
        }

        public TaskSaveData Task
        {
            get
            {
                return myTask;
            }
            set
            {
                myTask = value;
                Update();
            }
        }

        private void Update()
        {
            this.DataContext = myTask;

            listBox1.ItemsSource = myTask.WorkCompleted;
        }
    }
}
